package org.example.opus.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.ai.model.entity.Works;
import org.example.opus.mapper.AssistantFunctionsMapper;
import org.example.opus.mapper.WorksMapper;
import org.example.opus.service.IAssistantFunctionsService;
import org.example.pojo.AssistantFunctions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2025-02-08
 */
@Service
public class AssistantFunctionsServiceImpl extends ServiceImpl<AssistantFunctionsMapper, AssistantFunctions> implements IAssistantFunctionsService {

    @Autowired
    private AssistantFunctionsMapper assistantFunctionsMapper;
    @Override
    public List<AssistantFunctions> getAssistant(Integer functionId) {
        QueryWrapper<AssistantFunctions> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("function_id",functionId);
        List<AssistantFunctions> assistantFunctions = assistantFunctionsMapper.selectList(queryWrapper);
        System.out.println(assistantFunctions);
        return assistantFunctions;
    }
}
